package com.example.administrator.testc.TestAF;/**
 * Created by Administrator on 2016/4/14 0014.
 */

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.administrator.testc.mApp;

import pri.zey.custom.AFMananger.ActivityBase;
import pri.zey.custom.AFMananger.ActivityControl;
import pri.zey.custom.AFMananger.InterfaceHandler;
import pri.zey.custom.tools.TL;

/**
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>类描述
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>属性描述
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>方法描述
 */
public class TestMain extends ActivityBase {

    public Button bt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        bt = new Button(this);
        bt.setText(this.toString());
        setContentView(bt);
        bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getApplicationContext(), Activity_1.class));
//                List<TlBean> list = new ArrayList<TlBean>();
//                TlBean bean = new TlBean();
//                bean.tag = TL.eL; bean.msg = "this " + TestMain.class.toString();
//                list.add(bean);
//                bean = new TlBean();
//                bean.tag = TL.eL; bean.msg = "start " + Activity_1.class.toString();
//                list.add(bean);
//                TL.Map(list);
            }
        });
        IHandler = new InterfaceHandler() {
            @Override
            public void onRequest(ActivityBase ab) {
                bt.setText("sdjfoijoi");
            }

            @Override
            public void onResponse(ActivityBase ab) {
                bt.setText("ds15f665");
            }
        };
    }



    @Override
    protected void onDestroy() {
        super.onDestroy();
        TL.e("TAGSS", "destroy " + this.toString());
        mApp.control = new ActivityControl();
    }
}
